﻿<Window x:Class="SharpRefactoring.Gui.IntroduceMethodDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui" 
        xmlns:addin="clr-namespace:ICSharpCode.SharpDevelop.Refactoring" 
        xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
        xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
        WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" ResizeMode="NoResize"
        Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
        Title="{sd:Localize Dialog.Refactoring.IntroduceMethod.Title}" Height="400" Width="600">
  <DockPanel>
		<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" Margin="3" HorizontalAlignment="Center">
			<Button Content="{sd:Localize Global.OKButtonText}" Click="OKButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
			<Button Content="{sd:Localize Global.CancelButtonText}" Click="CancelButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
		</widgets:UniformGridWithSpacing>
    <TextBlock Text="{sd:Localize Dialog.Refactoring.IntroduceMethod.Description}" DockPanel.Dock="Top" Margin="3" TextWrapping="Wrap" />
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <RadioButton Margin="3" Content="{sd:Localize Dialog.Refactoring.IntroduceMethod.UseExisting}" Name="rbExisting" IsChecked="True" GroupName="group" Grid.Column="0" Grid.Row="0" />
      <ListBox Margin="3" Grid.Column="0" Grid.Row="1" Name="classList" IsEnabled="{Binding IsChecked, ElementName=rbExisting}">
    	<ListBox.ItemTemplate>
      		<DataTemplate>
    			<TextBlock Text="{Binding FullyQualifiedName}" />
    		</DataTemplate>
      	</ListBox.ItemTemplate>
      </ListBox>
      <RadioButton Margin="3" Content="{sd:Localize Dialog.Refactoring.IntroduceMethod.CreateNew}" Name="rbNew" GroupName="group" Grid.Column="0" Grid.Row="2" />
      <DockPanel Grid.Column="0" Grid.Row="3" IsEnabled="{Binding IsChecked, ElementName=rbNew}">
        <Label DockPanel.Dock="Left" Content="{sd:StringParse ${res:Global.Name}:}" Margin="3" />
        <TextBox Name="newClassName" Text="Extensions" Margin="3" />
      </DockPanel>
    </Grid>
  </DockPanel>
</Window>